package com.jqr.activity.roomsqlitedemo.data;

import android.content.Context;

import com.jqr.activity.roomsqlitedemo.model.User;

import java.util.List;

public class UserRepository {
    private UserDao userDao;

    private Context context;


    public  UserRepository(UserDao userDao,Context context){
        this.userDao=userDao;
        this.context=context;

    }
    public  void Add(User user){
         userDao.insert(user);
    }

    public List<User> getAll(){
        return  userDao.all();
    }
}
